#####################################################################
# Product:      KnowledgeEngine (Plone Edition)
#
# File:         PropertyReflection.py
#
# Copyright:    Copyright (c) 2004, Faulkner Technologies
#
# Author:       Brian Oliver
#
# Description:  Defines the PropertyReflection interface, which
#               specifies how PropertyDefinitions may be requested
#               at runtime.
#
# See Also:     PropertyDefinition, PropertyAccess 
#####################################################################

#####################################################################
## KnowledgeEngine Library Imports
# (none)

#####################################################################
## Zope Library Imports
# (none)
 
#####################################################################
## Python Library Imports
# (none)

#####################################################################
## PropertyReflection Interface Definition
class PropertyReflection:
    """
        An interface specifying how PropertyDefinitions are 
        requested.
    """
        
    #---------------------------------------------------------------#

    def getNrProperties(self):
        """
            ABSTRACT: Return the number of properties defined
            by the class implementing this interface
        """
        
        return 0
        
    #---------------------------------------------------------------#
        
    def isPropertyDefined(self, propertyIdentity):
        """
            ABSTRACT: Return if the specified property is defined 
            by the class implementing this interface. 

            RETURN TYPE: Boolean
        """

        return 0
        
    #---------------------------------------------------------------#
        
    def getPropertyDefinition(self, propertyIdentity):
        """
            ABSTRACT: Return the PropertyDefinition for the specified
            property identity. Returns None if the proeprty definition
            is unknown

            RETURN TYPE: PropertyDefinition
        """

        return None
        
    #---------------------------------------------------------------#
        
    def getPropertyDefinitions(self):
        """
            ABSTRACT: Return the PropertyDefinitions for the
            class implementing this interface

            RETURN TYPE: [PropertyDefinition]
        """

        return []
        
    #---------------------------------------------------------------#
        
    def addPropertyDefinition(self, propertyDefinition):
        """
            Adds/overrides the specified property definition to/in
            the class implementing this interface
        """

        pass
        
    #---------------------------------------------------------------#
        
    def removePropertyDefinition(self, propertyIdentity):
        """
            ABSTRACT: Removes the specified property definition
            from the class implementing this interface
        """

        pass
        
    #---------------------------------------------------------------#

    def hasEditableConstructorProperties(self):
        """
            ABSTRACT: Returns if the class implementing this
            interface has editable constructor properties
        """        
        
        return true
        
    #---------------------------------------------------------------#

    def hasEditableProperties(self):
        """
            ABSTRACT: Returns if the class implementing this
            interface has editable properties
        """        
        
        return true
        
    #---------------------------------------------------------------#

#####################################################################
## Class Initialisation
# (none)
